home *** CD-ROM | disk | FTP | other *** search
- // STexture.h: Schnittstelle fⁿr die Klasse STexture.
- //
- // Copyright by AndrΘ Stein
- // E-Mail: andre_stein@gmx.de, andre_stein@web.de
- // http://www.steinsoft.net
- //////////////////////////////////////////////////////////////////////
-
- #ifndef S_TEXTURE_H
- #define S_TEXTURE_H
-
- #if _MSC_VER > 1000
- #pragma once
- #endif
-
- #include <windows.h>
-
- #include <gl\gl.h>
- #include <gl\glu.h>
-
-
- class STexture
- {
- public:
- void destroy();
-
- /////////////
- // Konstruktoren
- ///////////////
- STexture();
- STexture(const char* filename,int minFilter = GL_LINEAR,
- int magFilter = GL_LINEAR, bool clampToEdge = false);
-
-
- virtual ~STexture();
-
- /////////////////
- // Funktionen
- ////////////////
-
- virtual bool createMipmap(const char* filename,int minFilter = GL_LINEAR_MIPMAP_NEAREST,
- int magFilter = GL_LINEAR, bool clampToEdge = false);
- virtual bool createTexture(const char* filename, int minFilter = GL_LINEAR,
- int magFilter = GL_LINEAR, bool clampToEdge = false);
-
- void select();
- GLuint getGLTexture();
-
-
- private:
- HBITMAP hBitmap;
- bool loadBitmap(const char* filename,BITMAP& bitmap);
- protected:
- GLuint texture;
- };
-
- #endif
-